package com.cosina.game.crystallight.ui.menu.transform;

import com.cosina.game.crystallight.ui.common.PaintSuite;

import android.graphics.Canvas;

public class ShadowTransform extends Transform{
	boolean plus = true;
	int alpha = 30;
	@Override
	public void doT(Canvas canvas) {
		PaintSuite.p4Simple.setAlpha(alphaBack);
	}

	@Override
	public void undoT(Canvas canvas) {
		alphaBack = PaintSuite.p4Simple.getAlpha();
		PaintSuite.p4Simple.setAlpha(alpha);
	}
	int alphaBack;

	@Override
	public void update() {
		if(plus){
			alpha += 10;
			if(alpha ==230){
				plus = false;
			}
		}else{
			alpha -= 10;
			if(alpha == 30){
				plus = true;
			}
		}
	}

	

}
